package com.vcc.service.service;

import com.mybatisflex.core.service.IService;
import com.vcc.data.entity.ClientPermission;

import java.util.Collection;
import java.util.List;

public interface ClientPermissionService extends IService<ClientPermission> {

    List<String> listByUserId(Long userId);

    List<ClientPermission> listByRoleId(Long roleId);

    Boolean existsByCode(String code);

    Boolean existsByName(String name);

    List<ClientPermission> listByParentId(Long parentId);

    List<Long> listIdsByParentId(Long id);

    Boolean setParentIdByCodes(List<String> codes, Long parentId);

    Boolean updateHasCheckedId(Long id, Boolean hasChecked);

    Boolean updateHasCheckedIdByParentId(Long parentId, Boolean hasChecked);

    Boolean updateHasCheckedId(Collection<Long> ids, Boolean hasChecked);

}
